#include<iostream>
using namespace std;
typedef long long LL;
const int N = 1e5 + 10;
int n, arr[N];
LL x;
int main()
{
	cin >> n >> x;
	for (int i = 1; i <= n; i++) cin >> arr[i];
	LL sum = 1;
	int l = 1, r = 1;
	int ans = n;
	bool flag = 0;
	while (l <= n && r <= n) {
		sum *= arr[r];
		cout << "sum===" << sum << endl;
		if (sum < x)r++;
		else {
			flag = 1;
			while (sum >= x) {
				ans = min(ans, r - l + 1);
				cout << "ans===" << ans << endl;
				sum /= arr[l];
				l++;
			}
			r++;
		}
	}
	if (!flag)cout << -1 << endl;
	else cout << ans << endl;
	return 0;
}